<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="../../baselist.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>新增部门</title>
</head>

<body>
<form name="icform" method="post">

    <div id="menubar">
        <div id="middleMenubar">
            <div id="innerMenubar">
                <div id="navMenubar">
                    <ul>
                        <li id="view"><a href="#" onclick="window.history.back();">返回</a></li>
                        <li id="new"><a href="#" onclick="formSubmit('update','_self');this.blur();">保存</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="textbox-title">
        <img src="../../staticfile/skin/default/images/icon/currency_yen.png"/>
        部门列表
    </div>

    <div>

        <div class="eXtremeTable">
            <table id="ec_table" class="tableRegion" width="98%">
                <tr>
                    <td>部门名称：</td>
                    <td><input type="text" name="deptName" value="${dept.deptName}"></td>
                </tr>
                <tr>
                    <td>部门id：</td>
                    <td>
                        <input type="hidden" name="deptId" value="${dept.deptId}">${dept.deptId}
                    </td>
                </tr>
                <tr>
                    <td>上级部门：</td>
                    <td><select name="parentDept.deptId">
                        <option value="">---无上级---</option>
                        <%--遍历当前所有的部门--%>
                        <c:forEach var="d" items="${depts}">
                            <option value="${d.deptId}" <c:if test="${d.deptId == dept.parentDept.deptId}">selected="selected"</c:if>>${d.deptName}
                            </option>
                        </c:forEach>
                    </select></td>
                </tr>
                <tr>
                    <td>部门状态：</td>

                    <td><input type="radio" name="state" value="1" <c:if test="${dept.state == 1}">checked</c:if>>开启</td>
                    <td><input type="radio" name="state" value="0" <c:if test="${dept.state == 0}">checked</c:if>>关闭</td>
                </tr>
            </table>
        </div>

    </div>


</form>
</body>
</html>

